/**
 * SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
 * SPDX-License-Identifier: Mulan PSL v2
 */
/* eslint-disable */


import {
    USER_ROLE
} from 'src/home/mod_common/const';
import {
    getStorage
} from 'src/util/local_storage';


let role = !getStorage(USER_ROLE);
export default [
    {
        name: 'user_resource_manage',
        path: '/user_resource_manage',
        component (resolve) {
            require.ensure([], require => resolve(require('../mod_cluster/user_resource_manage/index.vue')), 'mod_cluster');
        },
        redirect:'/user_resource_manage/platform_operations',
        meta: {
            title: _('平台管理'),
            hide: role,
            keepAlive: true,
        },
        children: [{
            name:'platform_operations',
            path: '/user_resource_manage/platform_operations',
            component (resolve) {
                require.ensure([], require => resolve(require('../mod_cluster/user_resource_manage/platform_operations/index.vue')), 'mod_cluster');
            },
            meta: {
                title: _('平台运维'),
                keepAlive: false //此组件不需要被缓存
            },
        },{
            name:'task_management_admin',
            path: '/user_resource_manage/task_management_admin',
            component (resolve) {
                require.ensure([], require => resolve(require('../mod_cluster/user_resource_manage/task_management_admin/index.vue')), 'mod_cluster');
            },
            meta: {
                title: _('任务管理'),
                keepAlive: true //此组件不需要被缓存
            },
        }]
    },
    {
        name: 'home',
        path: '/home',
        component (resolve) {
            require.ensure([], require => resolve(require('../mod_cluster/home/index.vue')), 'mod_cluster');
        },
        meta: {
            title: _('首页'),
        }
    },
    {
        name: 'algorithm_manager',
        path: '/algorithm_manager',
        component (resolve) {
            require.ensure([], require => resolve(require('../mod_cluster/algorithm_manager/index.vue')), 'mod_cluster');
        },
        meta: {
            title: _('算法管理')
        }
    },
    {
        name: 'datasource_manager',
        path: '/datasource_manager',
        component (resolve) {
            require.ensure([], require => resolve(require('../mod_cluster/datasource_manager/index.vue')), 'mod_cluster');
        },
        meta: {
            title: _('数据管理')
        }
    },
    {
      name:'task_detail_user',
      path:'/task_management/task_list/task_detail',
        component (resolve) {
            require.ensure([], require => resolve(require('../mod_cluster/task_detail/index.vue')), 'mod_cluster');
        },
        meta: {
            title: _('任务详情'),
            upTitle:_('任务查看')
        }
    },
    {
      name:'task_detail_admin',
      path:'/user_resource_manage/task_management_admin/task_detail',
        component (resolve) {
            require.ensure([], require => resolve(require('../mod_cluster/task_detail/index.vue')), 'mod_cluster');
        },
        meta: {
            title: _('任务详情'),
            upTitle:_('任务管理')
        }
    },
    {
        name: 'task_management',
        path: '/task_management',
        component (resolve) {
            require.ensure([], require => resolve(require('../mod_cluster/task_management/index.vue')), 'mod_cluster');
        },
        redirect:'/task_management/task_post',
        children: [
            {
                path: '/task_management/task_post',
                name: 'task_post',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/task_management/task_post/index.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('任务提交'),
                    keepAlive: false //此组件不需要被缓存
                },
                children: [
                    {
                        path: '/task_management/task_post/data_project',
                        name: 'data_project',
                        component (resolve) {
                            require.ensure([], require => resolve(require('../mod_cluster/task_management/task_post/data_project/index.vue')), 'mod_cluster');
                        },
                        meta: {
                            title: _('数据工程'),
                            keepAlive: false //此组件不需要被缓存
                        },
                    },
                ]
            },
            {
                path: '/task_management/task_list',
                name: 'task_list',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/task_management/task_list/index.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('任务查看'),
                    keepAlive: true //此组件不需要被缓存
                },
            }
        ],

        meta: {
            title: _('任务管理'),
            keepAlive: true,
        }
    },
    {
        name: 'project_manager',
        path: '/project_manager',
        redirect:'/project_manager/project_index',

        component (resolve) {
            require.ensure([], require => resolve(require('../mod_cluster/project_manager/index.vue')), 'mod_cluster');
        },
        children: [{
            path: '/project_manager/project_index',
            name: 'project_index',
            redirect:'/project_manager/project_index/cloud_ide',
            component (resolve) {
                require.ensure([], require => resolve(require('../mod_cluster/project_manager/project_index/index.vue')), 'mod_cluster');
            },
            meta: {
                title: _('项目首页'),
                keepAlive: false //此组件不需要被缓存
            },
            children: [{
                name: 'code_studio',
                path: '/project_manager/project_index/code_studio',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/project_index/code_studio/index.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('Code Studio'),
                }
            },{
                path: '/project_manager/project_index/model_repository',
                name: 'model_repository',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/project_index/model_repository/index.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('模型仓库'),
                    keepAlive:false
                }
            }, {
                path: '/project_manager/project_index/service_manager',
                name: 'service_manager',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/project_index/service_manager/index.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('服务管理'),
                    keepAlive:false
                }
            }, {
                path: '/project_manager/project_index/interact_ai_flow',
                name: 'interact_ai_flow',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/project_index/interact_ai_flow/index.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('AI Flow'),
                    keepAlive: false //此组件不需要被缓存
                }
            }, {
                path: '/project_manager/project_index/interact_task_manager',
                name: 'interact_task_manager',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/project_index/interact_task_manager/index.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('任务管理'),
                    keepAlive:true
                }
            }, {
                path: '/project_manager/project_index/interact_auto_ml',
                name: 'interact_auto_ml',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/project_index/interact_auto_ml/index.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('AUTO ML实验'),
                    keepAlive:false
                }
            },{
                path: '/project_manager/project_index/cloud_ide',
                name: 'cloud_ide',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/project_index/resource/cloud_ide.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('云IDE'),
                    keepAlive:false
                }
            },{
                path: '/project_manager/project_index/model-training',
                name: 'model_train',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/project_index/resource/model_train.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('模型训练'),
                    keepAlive:false
                }
            },{
                path: '/project_manager/project_index/model_deployment',
                name: 'model_deployment',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/project_index/resource/model_deployment.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('模型部署'),
                    keepAlive:false
                }
            },{
                path: '/project_manager/project_index/my_dataset',
                name: 'my_dataset',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/project_index/resource/my_dataset/index.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('我的数据集'),
                    keepAlive:false
                }
            }]
        },
            {
                path: '/project_manager/creat_dataset',
                name: 'creat_dataset',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/creat_dataset/index.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('创建数据集'),
                    keepAlive:false
                }
            },{
                path: '/project_manager/dataset_detail',
                name: 'dataset_detail',
                component (resolve) {
                    require.ensure([], require => resolve(require('../mod_cluster/project_manager/dataset_detail/index.vue')), 'mod_cluster');
                },
                meta: {
                    title: _('数据集详情'),
                    keepAlive:false
                }
            },
            {
            path: '/project_manager/pipeline_detail',
            name: 'pipeline_detail',
            component (resolve) {
                require.ensure([], require => resolve(require('../mod_cluster/project_manager/pipeline_detail/index.vue')), 'mod_cluster');
            },
            meta: {
                title: _('AI Flow详情'),
                keepAlive: false //此组件不需要被缓存
            }
        }, {
            path: '/project_manager/interact_auto_ml_detail',
            name: 'interact_auto_ml_detail',
            component (resolve) {
                require.ensure([], require => resolve(require('../mod_cluster/project_manager/interact_auto_ml_detail/index.vue')), 'mod_cluster');
            },
            meta: {
                title: _('AUTO ML实验详情'),
                keepAlive:false
            }
        }, {
            path: '/project_manager/interact_task_detail',
            name: 'interact_task_detail',
            component (resolve) {
                require.ensure([], require => resolve(require('../mod_cluster/project_manager/interact_task_detail/index.vue')), 'mod_cluster');
            },
            meta: {
                title: _('任务管理详情'),
                keepAlive:false
            }
        }],
        meta: {
            title: _('项目管理'),
            keepAlive: false // 是否启用 keep-alive
        }
    },
    {
        name: 'image_manager',
        path: '/image_manager',
        component (resolve) {
            require.ensure([], require => resolve(require('../mod_cluster/image_manager/index.vue')), 'mod_cluster');
        },
        meta: {
            title: _('镜像管理')
        }
    }
];
